package org.iabako.shared.iservice.business;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import org.iabako.shared.iservice.generic.SearchServiceAsync;

import java.util.Map;

/**
 * Created by jose on 17/01/15.
 */
public interface StockServiceAsync extends SearchServiceAsync {

    void saveStockModifications(Map<Long, Double> stockModificationsMap, AsyncCallback<Void> async);

    public static final class Util {
        private static StockServiceAsync instance;

        public static final StockServiceAsync getInstance() {
            if (instance == null) {
                instance = GWT.create(StockService.class);
            }
            return instance;
        }
    }
}
